home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6934 < prev    next >
Encoding:
Text File  |  1996-08-05  |  866 b   |  27 lines

  1. Newsgroups: comp.lang.c++
  2. Path: in1.uu.net!nih-csl!postman
  3. From: Dean Fuqua <dfuqua@raleigh.ibm.com>
  4. Subject: class self destuction??? 
  5. Content-Type: text/plain; charset=us-ascii
  6. Message-ID: <1996Feb20.152904.13555@alw.nih.gov>
  7. Sender: postman@alw.nih.gov (AMDS Postmaster)
  8. Nntp-Posting-Host: socks2.raleigh.ibm.com
  9. Content-Transfer-Encoding: 7bit
  10. Organization: National Institutes of Health
  11. Mime-Version: 1.0
  12. Date: Tue, 20 Feb 1996 15:29:04 GMT
  13. X-Mailer: Mozilla 1.12 (X11; I; AIX 1)
  14. X-Url: news: comp.lang.c++
  15.  
  16. I was wondering what the *correct* method of class suicide is.
  17. For example, while in a member function, a class realizes that 
  18. it is no longer wanted in little computing world and that it should 
  19. kill itself.
  20.  
  21. Should it call it own destuctor and that's that or should it do delete(this).
  22. The delete method seems a bit dangerous to me.
  23.  
  24. TIA,
  25. Dean Fuqua
  26.  
  27.